<?php 
class ViewModel{
	private $data = array();
	private $view = FALSE;
				function __Construct($file){
	//完成对视图的初始化
					if (file_exists($file)) {
					$this->view = $file;
				} 
			}
	//完成对数据的赋值
				 public function assign($var,$value){
					$this->data[$var] = $value;
				}
	//显示视图
				public function display(){
					$data = $this->data;
					include ($this->view);

				}



}

 ?>